package com.docker.fy.controller;


import com.docker.common.core.domain.AjaxResult;
import com.docker.fy.service.PatientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.docker.common.core.controller.BaseController;

import java.util.List;
import java.util.Map;


/**
 * 患者信息Controller
 * 
 * @author ruoyi
 * @date 2025-04-14
 */
@RestController
@RequestMapping("/patientInfo/patientInfo")
public class DoctorPatientMedicalRecordsController extends BaseController
{
    @Autowired
    private PatientService patientService;

    @RequestMapping("/getPrescriptionByPatientId/{id}")
    public AjaxResult getPrescriptionByPatientId(@PathVariable("id") Long patient_id) {

//        System.out.println(patient_id);
        //根据患者id获取所有信息
        List<Map> map = patientService.getInfoByPatientId(patient_id);
        return AjaxResult.success(map);
    }


}
